import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class ThreeDatabaseQueryPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _ThreeDBState();
}

class _ThreeDBState extends State<ThreeDatabaseQueryPage> {
  final List<String> tabs = [
    '药品目录库',
    '诊疗目录库',
    '耗材库',
  ];
  TabController _tabController;

  @override
  void initState() {
    super.initState();
    _tabController = TabController(
      vsync: ScrollableState(),
      length: tabs.length,
    );
  }

  @override
  void dispose() {
    _tabController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return AnnotatedRegion<SystemUiOverlayStyle>(
      value: SystemUiOverlayStyle.dark,
      child: Scaffold(
        body: Container(
         /* padding: EdgeInsets.only(top: height(40)),
          child: Column(
            children: [
              Row(
                children: [
                  BackButton(color: Colors.blue),
                  SizedBox(
                    width: width(650),
                    child: TabBar(
                      isScrollable: false,
                      controller: _tabController,
                      tabs: [
                        Tab(text: tabs[0]),
                        Tab(text: tabs[1]),
                        Tab(text: tabs[2]),
                      ],
                      labelColor: Color(u_2787de),
                      unselectedLabelColor: Color(u_666666),
                      indicatorSize: TabBarIndicatorSize.label,
                    ),
                  ),
                ],
              ),
              dividerH(),
              _buildSearch(),
              Expanded(
                child: TabBarView(
                  children: [
                    DrugsContentLibPage(),
                    TreatContentLibPage(),
                    ConsumeMaterialLibPage(),
                  ],
                  controller: _tabController,
                  physics: NeverScrollableScrollPhysics(),
                ),
              ),
            ],
          ),*/
        ),
      ),
    );
  }

 /* Widget _buildSearch() {
    return Container(
      padding: EdgeInsets.all(width(30)),
      child: Row(
        children: [
          TitleAndInput(
            title: '药品名称',
            inputType: TextInputType.text,
          ),
          SizedBox(width: 15),
          TitleAndInput(
            title: '医保药品编码',
            inputType: TextInputType.text,
          ),
          SizedBox(width: 15),
          _searchBtn(),
        ],
      ),
    );
  }*/

  ///搜索按钮
 /* Widget _searchBtn() {
    return Container(
      color: Color(u_2787de),
      width: 50.0,
      height: 25.0,
      child: OutlineButton(
        padding: EdgeInsets.all(0),
        child: Text(
          '搜索',
          style: TextStyle(
              color: Colors.white, fontSize: isLargeScreen ? 12.0 : 10.0),
        ),
        onPressed: () {},
      ),
    );
  }*/
}
